<?php $position = 2?>

<div class="title20"><?php echo $cats[$position]['name']?></div>

<!--<hr style="background:linear-gradient(to right, black, black);height:1px;">-->

<ul style="border-left:3px solid green;margin:20px 0 0 0;padding:0 0 0 20px">
  <?php $contents = Doctrine::getTable('Content')->doFetchArray(
            array(
                    'parentCategoryId'=>$cats[$position]['id'], 
                    'limit'=>(isset($limit) ? $limit : 5
                 )
        ));?>

  <?php foreach ($contents as $content):?>
    <li style="margin:0 0 15px 0;padding:0 0 0 0;position:relative;">

        <?php echo image_tag("http://".$content['cover'], array('style'=>'float:left;margin:0 15px 0 0;width:85px;height:120px;'));?>
        
        <div class="left" style="width:140px;height:100px;">
            <?php echo link_to($content['title'], 'content/leaf1?id='.$content['id'], array('class'=>'list-title'));?>
            
            <br clear="all">
    
            <?php echo link_to($content['category_name'], 'content/branch3?categoryId='.$content['category_id'], array('class'=>'list-category'));?>
            
            <br clear="all">
            
            <!--<div class="font11 gray">
              <?php //echo myTools::utf8_substr($content['intro'], 0, 30)?>
            </div>-->
            
            <?php echo link_to("Дэлгэрэнгүй &raquo;", 'content/leaf1?id='.$content['id'], array('class'=>'list-more', 'style'=>'position:absolute;bottom:-10px;right:5px;'));?>

        </div>

        <br clear="all">
        
    </li>
  <?php endforeach;?>
</ul>
